--- TubeUp.py	2019-12-15 17:47:06.218000000 +1100
+++ TubeUp_patch.py	2019-12-15 18:04:16.858000000 +1100
@@ -24,7 +24,7 @@
 
     def __init__(self,
                  verbose=False,
-                 dir_path='~/.tubeup',
+                 dir_path='tubeup',
                  ia_config_path=None):
         """
         `tubeup` is a tool to archive YouTube by downloading the videos and
@@ -261,11 +261,13 @@
 
         return ydl_opts
 
-    def upload_ia(self, videobasename, custom_meta=None):
+    def upload_ia(self, videobasename, pageurl, custom_meta=None):
         """
         Upload video to archive.org.
 
         :param videobasename:  A video base name.
+        :param pageurl:        Wikia page url that will be added in the description
+                               on archive.org
         :param custom_meta:    A custom meta, will be used by internetarchive
                                library when uploading to archive.org.
         :return:               A tuple containing item name and metadata used
@@ -282,7 +284,7 @@
         itemname = re.sub(r'\W+', '-', itemname)
 
         metadata = self.create_archive_org_metadata_from_youtubedl_meta(
-            vid_meta)
+            vid_meta, pageurl)
 
         # Delete empty description file
         description_file_path = videobasename + '.description'
@@ -331,7 +333,7 @@
 
         return itemname, metadata
 
-    def archive_urls(self, urls, custom_meta=None, proxy=None,
+    def archive_urls(self, urls, pageurl, custom_meta=None, proxy=None,
                      ydl_username=None, ydl_password=None,
                      use_download_archive=False):
         """
@@ -340,6 +342,8 @@
 
         :param urls:                  List of url that will be downloaded and uploaded
                                       to archive.org
+        :param pageurl:               Wikia page url that will be added in the description
+                                      on archive.org
         :param custom_meta:           A custom metadata that will be used when
                                       uploading the file with archive.org.
         :param proxy_url:             A proxy url for YoutubeDL.
@@ -358,7 +362,7 @@
             urls, proxy, ydl_username, ydl_password, use_download_archive)
 
         for basename in downloaded_file_basenames:
-            identifier, meta = self.upload_ia(basename, custom_meta)
+            identifier, meta = self.upload_ia(basename, pageurl, custom_meta)
             yield identifier, meta
 
     @staticmethod
@@ -402,11 +406,13 @@
         return licenseurl
 
     @staticmethod
-    def create_archive_org_metadata_from_youtubedl_meta(vid_meta):
+    def create_archive_org_metadata_from_youtubedl_meta(vid_meta, pageurl):
         """
         Create an archive.org from youtubedl-generated metadata.
 
         :param vid_meta: A dict containing youtubedl-generated metadata.
+        :param pageurl:               Wikia page url that will be added in the description
+                                      on archive.org
         :return:         A dict containing metadata to be used by
                          internetarchive library.
         """
@@ -457,9 +463,15 @@
         # if there is no description don't upload the empty .description file
         description_text = vid_meta.get('description', '')
 
-        description = ('{0} <br/><br/>Source: <a href="{1}">{2}</a>'
-                       '<br/>Uploader: <a href="{3}">{4}</a>').format(
-            description_text, videourl, videourl, uploader_url, uploader)
+        archived_from = pageurl.split(" ", 1)[0]
+        appeared_as = ""
+        if (archived_from != pageurl):
+            appeared_as = " " + pageurl.split(" ", 1)[1]
+        
+        description = ('{0}<br/><br/>Source: <a href="{1}">{2}</a>'
+                       '<br/>Uploader: <a href="{3}">{4}</a>'
+                       '<br/>Archived from <a href="{5}">{6}</a>{7} automatically by <a href="https://notabug.org/mandy/about/wiki">Mandy</a> archivist bot.').format(
+            description_text, videourl, videourl, uploader_url, uploader, archived_from, archived_from, appeared_as)
 
         metadata = dict(
             mediatype=('audio' if collection == 'opensource_audio'
